<template>
  <div class="payInfo">
    <vxe-table
      border
      stripe
      ref="tableRef"
      size="small"
      header-align="center"
      :data="tableData"
    >
      <vxe-column type="seq" width="50" title="序号" align="center" fixed="left" />
      <vxe-column field="shipmentCode" title="发货单号" align="center" />
      <vxe-column field="expressCode" title="物流单号" align="center" />
      <vxe-column field="expressBillPrinter" title="打印物流单" align="center" />
      <vxe-column field="shipmentBillPrinter" title="打印发货单" align="center" />
      <vxe-column field="scanned" title="扫描" align="center" />
      <vxe-column field="deliveryStatus" title="发货单状态" align="center" />
      <vxe-column field="warehouseName" title="仓库" align="center" />
      <vxe-column field="expressCompany" title="物流公司" align="center" />
      <vxe-column field="actualDeliveryTime" title="发货时间" align="center" />
      <vxe-column field="productCode" title="商品编码" align="center" />
      <vxe-column field="productName" title="商品名称" align="center" />
      <vxe-column field="shipmentCount" title="发货数量" align="center" />

    </vxe-table>
  </div>
</template>

<script>
import {
  listShippingInfo
} from "@/api/mes/sales/saleOrder";
export default {
  name: 'shippingInfo',
  data() {
    return {
      tableData: [],
    };
  },
  props: {
    cellId: {
      type: String,
      default: ''
    }
  },
  watch: {
    cellId: {
      immediate: true,
      handler(newVal) {
        if (newVal && newVal !== 'add') {
          listShippingInfo(newVal).then(res => {
            if (res.code === 200) {
              this.tableData = res.data;
            }
          })
        } else {
          this.tableData = [];
        }
      }
    }
  },
};
</script>

<style lang="scss" scoped>
.payInfo-header {
  margin-bottom: 10px;
}
</style>

